public class text {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root=binaryTree.create();
        binaryTree.preOrder(binaryTree.create());
        System.out.println();
        binaryTree.MiddleOrder(binaryTree.create());
        System.out.println();
        binaryTree.LastOrder(binaryTree.create());
        System.out.println();
        System.out.println("=======二叉树节点的个数========");
        System.out.println(binaryTree.getTreeNdoeCount(root));
        System.out.println(binaryTree.getTreeNodeCount2(root));
        System.out.println("=======叶子节点的个数========");
        System.out.println(binaryTree.getLeafNodeCount1(root));
        System.out.println(binaryTree.getLeafNodeCount2(root));
        System.out.println("=======二叉树第三层结点的个数========");
        System.out.println(binaryTree.getK(root,3));
        System.out.println("=======二叉树第二层结点的个数========");
        System.out.println(binaryTree.getK(root,2));
        System.out.println("=======二叉树的高度========");
        System.out.println(binaryTree.getTreeNodeHeight(root));
        System.out.println("=======二叉树中是否包含值为B的节点========");
        System.out.println(binaryTree.find(root,'B'));








    }
}
